﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Pswservice.aspx.cs" Inherits="client_Pswservice" Title="Password Service" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style1
        {
            width: 188px;
        }
        .style2
        {
            width: 296px;
        }
        #Button_submit
        {
            width: 87px;
        }
    </style>
    <script language="javascript" type="text/javascript">
function validate()
{
 if (document.getElementById("<%=TextBox_old.ClientID%>").value=="")
      {
                 alert("Old Password can not be blank");
                 document.getElementById("<%=TextBox_old.ClientID%>").focus();
                 return false;
      }
       if (document.getElementById("<%=TextBox_new.ClientID%>").value=="")
      {
                 alert("New Password can not be blank");
                 document.getElementById("<%=TextBox_new.ClientID%>").focus();
                 return false;
      }
       if (document.getElementById("<%=TextBox_confirmnew.ClientID%>").value=="")
      {
                 alert("Confirm Password can not be blank");
                 document.getElementById("<%=TextBox_confirmnew.ClientID%>").focus();
                 return false;
      }
           if (document.getElementById("<%=TextBox_new.ClientID%>").value!=document.getElementById("<%=TextBox_confirmnew.ClientID%>").value)
      {
                 alert("New Password mismatches the Conform Passord");
                 document.getElementById("<%=TextBox_new.ClientID%>").focus();
                 return false;
      }
}
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
    &nbsp;&nbsp;&nbsp;&nbsp;
    <asp:Panel ID="Panel1" runat="server" HorizontalAlign=Center>
   
        <table style="width:50%;">
            <tr>
                <td class="style1">
                    Old password:</td>
                <td class="style2">
                    <asp:TextBox ID="TextBox_old" runat="server" TextMode=Password 
                        ValidationGroup="pswvalidation"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    New Password:</td>
                <td class="style2">
                    <asp:TextBox ID="TextBox_new" runat="server" TextMode=Password ValidationGroup="pswvalidation"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    Confirm Password:</td>
                <td class="style2">
                    <asp:TextBox ID="TextBox_confirmnew" runat="server" TextMode=Password ></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    &nbsp;</td>
                <td class="style2" align=left>
                   <asp:Button ID="btnSubmit" OnClientClick=" return validate()" runat="server" 
                        Text="Submit" onclick="btnSubmit_Click" />
                        <asp:LinkButton ID="cancel_but" PostBackUrl="~/client/Main.aspx" runat="server" 
                        Text="Cancel"/>
                       
            </tr></table></asp:Panel>&nbsp;
</asp:Content>

